package com.ssm.zhihu_ssm.controller;

import com.ssm.zhihu_ssm.service.AdminClassifyService;
import com.ssm.zhihu_ssm.util.ReturnMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class AdminClassifyController {

    @Autowired
    private AdminClassifyService adminClassifyService;

    @RequestMapping("/deleteClassifyByClassifById")
    public Map<String, Object> deleteClassifyByClassifById(int id){//后台删除话题

        adminClassifyService.deleteClassifyByClassifById(id);
        Map<String, Object> map = ReturnMap.ReturnMapS("true");
        return map;
    }

    @RequestMapping("/addClassify")
    public Map<String, Object> addClassify(String classify){//后台删除话题
        adminClassifyService.addClassify(classify);
        Map<String, Object> map = ReturnMap.ReturnMapS("true");
        return map;
    }

}
